#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTextEdit>
#include <QButtonGroup>
#include "code_highlighter.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:
    Ui::Widget *ui;


private:
    void loadFile(QTextEdit* textEdit,QString fileName);

private:
    CodeHighLighter* codeHighLighter;
    QString codeString;
    int codeCharIndex;
    QTimer* codeTimer;
    QButtonGroup* codeRadioGroup;

    //声明槽函数
private slots:
    void codeRadioClicked();
    void onCodeTimeout();







};
#endif // WIDGET_H
